﻿using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;

namespace BookStore.Models
{
    public class User
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public string Username { get; set; }

        [Required]
        public bool IsAdmin { get; set; }

        public decimal Balance { get; set; }

        [Required]
        public string AuthCode { get; set; }

        public string SessionKey { get; set; }

        public virtual ICollection<BookRecord> BookRecords { get; set; }

        public User()
        {
            this.BookRecords = new HashSet<BookRecord>();
        }
    }
}